/*
 * @Author: your name
 * @Date: 2022-08-16 18:41:41
 * @LastEditTime: 2022-08-19 16:15:35
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \aroperation-web\src\api\model.js
 */
import Axios from 'axios'
const IP = window.IP
const http = Axios.create()
http.defaults.timeout = 20000

let ROOT, GetJson// 目的是在开发环境中能够跨域请求文件

if (process.env.NODE_ENV === 'development') {
  console.log('开发环境')
  ROOT = IP.httpsUrl
  GetJson = IP.resourUrl
} else if (process.env.NODE_ENV === 'production') {
  console.log('生成环境')
  ROOT = IP.httpsUrl
  GetJson = IP.resourUrl
}
// 上传
export function getUploadFileUrl () {
  const url = ROOT + '/assist/upload/add'
  return url
}
//上传带有封面的视频
export function getUploadVideoAndCover () {
  const url = ROOT + '/assist/upload/addAndCover'
  return url
}